//package org.huyue.huyuexia.config;
//
//import lombok.extern.slf4j.Slf4j;
//import org.huyue.huyuexia.filter.TokenFilter;
//import org.springframework.boot.web.servlet.FilterRegistrationBean;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.annotation.Order;
//
//@Slf4j
//public class FilterConfig {
//    @Bean
//    public FilterRegistrationBean<TokenFilter> tokenFilter() {
//        FilterRegistrationBean<TokenFilter> registration = new FilterRegistrationBean<>();
//        registration.setFilter(new TokenFilter());
//        registration.addUrlPatterns("/*");
//        registration.setOrder(100); // 确保足够大，最后执行
//        return registration;
//    }
//}
